<!--{eval $_TPL['titles'] = array('登录后台管理');}-->
<!--{template admin/header_tpl}-->
<div class="grid_24 ">
	<form action="{SITEURL}admin/login/index" method="post" accept-charset="utf-8" id="loginform">
		<div class="grid_15">
			<table class="formtable">
				<tr>
					<th width="20%">用户名:（Email）</th>
					<td>{$user[username]}</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<th>密&nbsp;&nbsp;&nbsp;码:</th>
					<td><input id="password" type="password" value="" name="password"></td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<input type="hidden" name="formhash" value="<!--{eval echo formhash();}-->" />
					<td colspan="3"><input type="submit" value="登录" name="loginsubmit"></p></td>
				</tr>
			</table>
		</div>

	</form>
</div>

<script src="<!--{eval echo base_url();}-->resources/js/jquery.validate.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.messages_cn.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/validate.additional-methods.min.js" type="text/javascript"></script>
<script src="<!--{eval echo base_url();}-->resources/js/jquery.form.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
	var validator = $("#loginform").validate({
		onfocusout:false,
		onkeyup:false,
		errorElement:"span",
		rules: {
			username: {
				required: true,
				rangelength:[1,100],
				email:true
			},
			password: {
				required: true,
				rangelength:[1,32]
			}
		},
		messages: {
			username: {
				required: "请输入用户名",
				rangelength: $.validator.format("标题长度 为{0} 到 {1} 汉字"),
				email: "请输入正确的邮箱格式"
			},
			password: {
				required: "请输入密码",
				rangelength: $.validator.format("长度 为{0} 到 {1} 汉字")
			}
		},
		errorPlacement: function(error, element) {
			error.appendTo(element.parent("td").next("td"));
		},
		highlight: function(element, errorClass) {
				$(element).fadeOut(function() {
				$(element).fadeIn();
			});
		},
		success: function(label) {
		}
	});
});
</script>
<!--{template admin/footer_tpl}-->